The Dreamweaver JavaScript API > Deprecated functions > dreamweaver.getObjectTags() |
![]() ![]() ![]() |
Availability
Dreamweaver1.0
Description
Scans the specified document for instances of the specified tags or, if no tags are specified, for all tags in the document. This function is equivalent to calling getElementsByTagName()
and then getting outerHTML
for each element in the nodelist
.
Arguments
sourceDoc
, {tag1}
, {tag2}
,...{tagN}
![]() |
sourceDoc must be "document" , "parent" , "parent.frames[ number ]" , "parent.frames[' frameName ']" , or a URL. document specifies the document that has the focus and contains the current selection. parent specifies the parent frameset (if the currently selected document is in a frame), and parent.frames[ number ] and parent.frames[' frameName '] specify a document that is in a particular frame within the frameset containing the current document. If the argument is a relative URL, it is relative to the extension file. |
![]() |
The second and subsequent arguments, if supplied, are the names of tags (for example, "IMG" , "FORM" , "HR" ). |
Returns
An array of strings, each the HTML source code for an instance of the requested tag type in the specified document.
![]() |
If one of the tag arguments is LAYER , the function returns all LAYER and ILAYER tags and all absolutely positioned DIV and SPAN tags. |
![]() |
If one of the tag arguments is INPUT , the function returns all form elements. To get a particular type of form element, specify INPUT/ TYPE , where TYPE is button , text , radio , checkbox , password , textarea , select , hidden , reset , or submit . |
When the same list of arguments is passed to getObjectRefs()
, the two functions return arrays of the same length.
Example
dreamweaver.getObjectTags("document", "IMG")
, depending on the contents of the active document, might return an array with the following items:
![]() |
'<IMG SRC="/images/dot.gif" WIDTH="10" HEIGHT="10" NAME="bullet">' |
![]() |
'<IMG SRC="header.gif" WIDTH="400" HEIGHT="32" NAME="header">' |
![]() |
'<IMG SRC="971208_nj.jpg" WIDTH="119" HEIGHT="119" NAME="headshot">' |
![]() ![]() ![]() |